Optimal. Leaf size=226 \[ \frac {1}{6} i b c^2 d^3 x^3 \left (a+b \tan ^{-1}(c x)\right )+b c d^3 x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {4 b d^3 \log \left (\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{c}-\frac {7}{2} i a b d^3 x+\frac {11 i b^2 d^3 \log \left (c^2 x^2+1\right )}{6 c}-\frac {2 i b^2 d^3 \text {Li}_2\left (1-\frac {2}{1-i c x}\right )}{c}-\frac {1}{12} i b^2 c d^3 x^2+\frac {b^2 d^3 \tan ^{-1}(c x)}{c}-\frac {7}{2} i b^2 d^3 x \tan ^{-1}(c x)-b^2 d^3 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 226, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 12, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {4864, 4846, 260, 4852, 321, 203, 266, 43, 1586, 4854, 2402, 2315} \[ -\frac {2 i b^2 d^3 \text {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{c}+\frac {1}{6} i b c^2 d^3 x^3 \left (a+b \tan ^{-1}(c x)\right )+b c d^3 x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {4 b d^3 \log \left (\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{c}-\frac {7}{2} i a b d^3 x+\frac {11 i b^2 d^3 \log \left (c^2 x^2+1\right )}{6 c}-\frac {1}{12} i b^2 c d^3 x^2+\frac {b^2 d^3 \tan ^{-1}(c x)}{c}-\frac {7}{2} i b^2 d^3 x \tan ^{-1}(c x)-b^2 d^3 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 203
Rule 260
Rule 266
Rule 321
Rule 1586
Rule 2315
Rule 2402
Rule 4846
Rule 4852
Rule 4854
Rule 4864
Rubi steps
\begin {align*} \int (d+i c d x)^3 \left (a+b \tan ^{-1}(c x)\right )^2 \, dx &=-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {(i b) \int \left (-7 d^4 \left (a+b \tan ^{-1}(c x)\right )-4 i c d^4 x \left (a+b \tan ^{-1}(c x)\right )+c^2 d^4 x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {8 i \left (i d^4-c d^4 x\right ) \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2}\right ) \, dx}{2 d}\\ &=-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {(4 b) \int \frac {\left (i d^4-c d^4 x\right ) \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{d}-\frac {1}{2} \left (7 i b d^3\right ) \int \left (a+b \tan ^{-1}(c x)\right ) \, dx+\left (2 b c d^3\right ) \int x \left (a+b \tan ^{-1}(c x)\right ) \, dx+\frac {1}{2} \left (i b c^2 d^3\right ) \int x^2 \left (a+b \tan ^{-1}(c x)\right ) \, dx\\ &=-\frac {7}{2} i a b d^3 x+b c d^3 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{6} i b c^2 d^3 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {(4 b) \int \frac {a+b \tan ^{-1}(c x)}{-\frac {i}{d^4}-\frac {c x}{d^4}} \, dx}{d}-\frac {1}{2} \left (7 i b^2 d^3\right ) \int \tan ^{-1}(c x) \, dx-\left (b^2 c^2 d^3\right ) \int \frac {x^2}{1+c^2 x^2} \, dx-\frac {1}{6} \left (i b^2 c^3 d^3\right ) \int \frac {x^3}{1+c^2 x^2} \, dx\\ &=-\frac {7}{2} i a b d^3 x-b^2 d^3 x-\frac {7}{2} i b^2 d^3 x \tan ^{-1}(c x)+b c d^3 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{6} i b c^2 d^3 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {4 b d^3 \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )}{c}+\left (b^2 d^3\right ) \int \frac {1}{1+c^2 x^2} \, dx-\left (4 b^2 d^3\right ) \int \frac {\log \left (\frac {2}{1-i c x}\right )}{1+c^2 x^2} \, dx+\frac {1}{2} \left (7 i b^2 c d^3\right ) \int \frac {x}{1+c^2 x^2} \, dx-\frac {1}{12} \left (i b^2 c^3 d^3\right ) \operatorname {Subst}\left (\int \frac {x}{1+c^2 x} \, dx,x,x^2\right )\\ &=-\frac {7}{2} i a b d^3 x-b^2 d^3 x+\frac {b^2 d^3 \tan ^{-1}(c x)}{c}-\frac {7}{2} i b^2 d^3 x \tan ^{-1}(c x)+b c d^3 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{6} i b c^2 d^3 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {4 b d^3 \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )}{c}+\frac {7 i b^2 d^3 \log \left (1+c^2 x^2\right )}{4 c}-\frac {\left (4 i b^2 d^3\right ) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-i c x}\right )}{c}-\frac {1}{12} \left (i b^2 c^3 d^3\right ) \operatorname {Subst}\left (\int \left (\frac {1}{c^2}-\frac {1}{c^2 \left (1+c^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=-\frac {7}{2} i a b d^3 x-b^2 d^3 x-\frac {1}{12} i b^2 c d^3 x^2+\frac {b^2 d^3 \tan ^{-1}(c x)}{c}-\frac {7}{2} i b^2 d^3 x \tan ^{-1}(c x)+b c d^3 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{6} i b c^2 d^3 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 c}+\frac {4 b d^3 \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )}{c}+\frac {11 i b^2 d^3 \log \left (1+c^2 x^2\right )}{6 c}-\frac {2 i b^2 d^3 \text {Li}_2\left (1-\frac {2}{1-i c x}\right )}{c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.95, size = 267, normalized size = 1.18 \[ -\frac {i d^3 \left (3 a^2 c^4 x^4-12 i a^2 c^3 x^3-18 a^2 c^2 x^2+12 i a^2 c x-2 a b c^3 x^3+12 i a b c^2 x^2-24 i a b \log \left (c^2 x^2+1\right )+2 b \tan ^{-1}(c x) \left (3 a \left (c^4 x^4-4 i c^3 x^3-6 c^2 x^2+4 i c x-7\right )+b \left (-c^3 x^3+6 i c^2 x^2+21 c x+6 i\right )+24 i b \log \left (1+e^{2 i \tan ^{-1}(c x)}\right )\right )+42 a b c x+b^2 c^2 x^2-22 b^2 \log \left (c^2 x^2+1\right )+24 b^2 \text {Li}_2\left (-e^{2 i \tan ^{-1}(c x)}\right )-12 i b^2 c x+3 b^2 (c x-i)^4 \tan ^{-1}(c x)^2+b^2\right )}{12 c} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.50, size = 0, normalized size = 0.00 \[ \frac {1}{16} \, {\left (i \, b^{2} c^{3} d^{3} x^{4} + 4 \, b^{2} c^{2} d^{3} x^{3} - 6 i \, b^{2} c d^{3} x^{2} - 4 \, b^{2} d^{3} x\right )} \log \left (-\frac {c x + i}{c x - i}\right )^{2} + {\rm integral}\left (\frac {-4 i \, a^{2} c^{5} d^{3} x^{5} - 12 \, a^{2} c^{4} d^{3} x^{4} + 8 i \, a^{2} c^{3} d^{3} x^{3} - 8 \, a^{2} c^{2} d^{3} x^{2} + 12 i \, a^{2} c d^{3} x + 4 \, a^{2} d^{3} + {\left (4 \, a b c^{5} d^{3} x^{5} + {\left (-12 i \, a b - b^{2}\right )} c^{4} d^{3} x^{4} - {\left (8 \, a b - 4 i \, b^{2}\right )} c^{3} d^{3} x^{3} - 2 \, {\left (4 i \, a b - 3 \, b^{2}\right )} c^{2} d^{3} x^{2} - {\left (12 \, a b + 4 i \, b^{2}\right )} c d^{3} x + 4 i \, a b d^{3}\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{4 \, {\left (c^{2} x^{2} + 1\right )}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.11, size = 620, normalized size = 2.74 \[ -\frac {i d^{3} a^{2}}{4 c}+d^{3} b^{2} \arctan \left (c x \right )^{2} x -c^{2} d^{3} a^{2} x^{3}+\frac {i c^{2} d^{3} a b \,x^{3}}{6}+\frac {i c^{2} d^{3} b^{2} \arctan \left (c x \right ) x^{3}}{6}+\frac {i d^{3} b^{2} \ln \left (c x +i\right ) \ln \left (c^{2} x^{2}+1\right )}{c}-\frac {i c^{3} d^{3} b^{2} \arctan \left (c x \right )^{2} x^{4}}{4}+\frac {3 i c \,d^{3} b^{2} \arctan \left (c x \right )^{2} x^{2}}{2}-\frac {i d^{3} b^{2} \ln \left (c x +i\right ) \ln \left (\frac {i \left (c x -i\right )}{2}\right )}{c}+\frac {7 i d^{3} a b \arctan \left (c x \right )}{2 c}+\frac {i d^{3} b^{2} \ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )}{c}-\frac {i d^{3} b^{2} \ln \left (c x -i\right ) \ln \left (c^{2} x^{2}+1\right )}{c}-2 c^{2} d^{3} a b \arctan \left (c x \right ) x^{3}+\frac {b^{2} d^{3} \arctan \left (c x \right )}{c}-\frac {7 i b^{2} d^{3} x \arctan \left (c x \right )}{2}-\frac {i d^{3} b^{2} \dilog \left (\frac {i \left (c x -i\right )}{2}\right )}{c}+\frac {i d^{3} b^{2} \dilog \left (-\frac {i \left (c x +i\right )}{2}\right )}{c}+\frac {7 i d^{3} b^{2} \arctan \left (c x \right )^{2}}{4 c}+\frac {i d^{3} b^{2} \ln \left (c x -i\right )^{2}}{2 c}-\frac {i d^{3} b^{2} \ln \left (c x +i\right )^{2}}{2 c}+\frac {3 i c \,x^{2} a^{2} d^{3}}{2}-\frac {i c^{3} x^{4} a^{2} d^{3}}{4}-\frac {7 i a b \,d^{3} x}{2}-\frac {i b^{2} c \,d^{3} x^{2}}{12}+\frac {11 i b^{2} d^{3} \ln \left (c^{2} x^{2}+1\right )}{6 c}-\frac {2 d^{3} a b \ln \left (c^{2} x^{2}+1\right )}{c}-\frac {2 d^{3} b^{2} \arctan \left (c x \right ) \ln \left (c^{2} x^{2}+1\right )}{c}+c \,d^{3} b^{2} \arctan \left (c x \right ) x^{2}-c^{2} d^{3} b^{2} \arctan \left (c x \right )^{2} x^{3}+2 d^{3} a b \arctan \left (c x \right ) x +c \,d^{3} a b \,x^{2}-b^{2} d^{3} x +x \,a^{2} d^{3}+3 i c \,d^{3} a b \arctan \left (c x \right ) x^{2}-\frac {i c^{3} d^{3} a b \arctan \left (c x \right ) x^{4}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2\,{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^3 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________